package cn.hbu.zlfw.patent.service.impl;

import java.util.Date;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.hbu.zlfw.common.base.service.impl.BaseServiceImpl;
import cn.hbu.zlfw.common.util.Utility;
import cn.hbu.zlfw.patent.dao.PatentSynergyDao;
import cn.hbu.zlfw.patent.entity.PatentSynergy;
import cn.hbu.zlfw.patent.service.PatentSynergyService;
/**
 * 
 * @ClassName: PatentSynergyServiceImpl 
 * @Description: 专利协同申请书service接口实现
 * @author 王鹏伟<1223443289@qq.com>
 * @date 2017年11月3日 上午10:57:38  
 * @version V1.0
 */
@Service("patentSynergyService")
@Transactional
public class PatentSynergyServiceImpl  extends BaseServiceImpl<PatentSynergy, String> implements PatentSynergyService{

	@Autowired
	private PatentSynergyDao patentSynergyDao;
	/*
	 * (non-Javadoc)
	 * @see cn.hbu.zlfw.patent.service.PatentSynergyService#getNewestSynergyByPatentId(java.lang.String)
	 */
	@Override
	public PatentSynergy getNewestSynergyByPatentId(String patentId) {
		return this.patentSynergyDao.getNewestSynergyByPatentId(patentId);
	}
	@Override
	public PatentSynergy getPatentSynergyByCreateTime(Date createTime) {
		Map<String,Object> params = Utility.getMapInstance();
		if(createTime!=null){
			params.put("createTime", createTime);
		}
		return this.patentSynergyDao.getPatentSynergyByParams(params);
	}

}
